Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(detector/github): Github dependency graph API request will be retried on error #1650

Merged
merged 3 commits into from
Apr 24, 2023

Conversation

kl-sinclair
Copy link
Collaborator

@kl-sinclair kl-sinclair commented Apr 20, 2023

What did you implement:

Dependency graph API request can be failed for some reason like timeout at busy server time.
so this PR gives chances to retry request up to 3 times, and enhanced error handling a little bit.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

$ vuls report -to-localfile -format-cyclonedx-json
or 
$ vuls report -to-localfile -format-cyclonedx-xml

Retrying on timeout (raised on purpose)

スクリーンショット 2023-04-21 12 17 49

Retrying on bad request (raised on purpose)

スクリーンショット 2023-04-21 12 23 13

Checklist:

You don't have to satisfy all of the following.

  • Write tests
  • Write documentation
  • Check that there aren't other open pull requests for the same issue/feature
  • Format your source code by make fmt
  • Pass the test by make test
  • Provide verification config / commands
  • Enable "Allow edits from maintainers" for this PR
  • Update the messages below

Is this ready for review?: YES

Reference

#1642

@kl-sinclair kl-sinclair self-assigned this Apr 20, 2023
@kl-sinclair kl-sinclair marked this pull request as ready for review April 21, 2023 03:27
@kotakanbe kotakanbe merged commit b91a7b7 into future-architect:master Apr 24, 2023
@kl-sinclair kl-sinclair deleted the gsa-deps-retry branch April 24, 2023 03:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants